import Vue from "vue";
import axios from "../utils/index";
import imgsrc from "../assets/avatar.jpg";
Vue.filter("imgUrl", (val) => {
  if (!val) {
    return imgsrc;
  } else if (val.indexOf("http") == -1) {
    return axios.defaults.baseURL + val;
  } else {
    return val;
  }
});
